`:top
`!Asynchrony`!, in `F33f`_`[computer programming`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computer_programming]`_`f, refers to the occurrence of events independent of the main `F33f`_`[program flow`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Control_flow]`_`f and ways to deal with such events. These may be "outside" events such as the arrival of `F33f`_`[signals`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Unix_signal]`_`f, or actions instigated by a program that take place `F33f`_`[concurrently`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Concurrent_computing]`_`f with program execution, without the program `F33f`_`[hanging`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Hang_(computing)]`_`f to wait for results.`:cite-ref-davies-1-0[`F5bf`_`[1`#cite-note-davies-1]`_`f] `F33f`_`[Asynchronous input/output`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Asynchronous_I/O]`_`f is an example of the latter case of asynchrony, and lets programs issue commands to storage or network devices that service these requests while the `F33f`_`[processor`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Central_processing_unit]`_`f continues executing the program. Doing so provides a degree of `F33f`_`[concurrency`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Concurrency_(computer_science)]`_`f.`:cite-ref-davies-1-1[`F5bf`_`[1`#cite-note-davies-1]`_`f]
A common way for dealing with asynchrony in a `F33f`_`[programming interface`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Application_programming_interface]`_`f is to provide `F33f`_`[subroutines`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Subroutine]`_`f that return a `F33f`_`[future or promise`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Futures_and_promises]`_`f that represents the ongoing operation, and a synchronizing operation that `F33f`_`[blocks`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Blocking_(computing)]`_`f until the future or promise is completed. Some programming languages, such as `F33f`_`[Cilk`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Cilk]`_`f, have special syntax for expressing an asynchronous procedure call.`:cite-ref-spp-2-0[`F5bf`_`[2`#cite-note-spp-2]`_`f]
Examples of asynchrony include the following:
• `F33f`_`[Asynchronous procedure call`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Asynchronous_procedure_call]`_`f, a method to run a procedure concurrently, a lightweight alternative to `F33f`_`[threads`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Thread_(computing)]`_`f.
• `F33f`_`[Ajax`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Ajax_(programming)]`_`f is a set of `F33f`_`[client-side`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Client-side]`_`f `F33f`_`[web technologies`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Web_development]`_`f used by the client to create asynchronous I/O `F33f`_`[web applications`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Web_application]`_`f.
• `!Asynchronous method dispatch`! (AMD), a `F33f`_`[data communication`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Data_communication]`_`f method used when there is a need for the server side to handle a large number of long lasting client requests.`:cite-ref-3[`F5bf`_`[3`#cite-note-3]`_`f] Using synchronous method dispatch (SMD), this scenario may turn the server into an unavailable busy state resulting in a connection failure response caused by a `F33f`_`[network`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Computer_network]`_`f connection request `F33f`_`[timeout`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Timeout_(computing)]`_`f. The servicing of a client request is immediately dispatched to an available `F33f`_`[thread`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Thread_(computer_science)]`_`f from a `F33f`_`[pool of threads`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Thread_pool_pattern]`_`f and the client is put in a blocking state. Upon the completion of the task, the server is notified by a callback. The server unblocks the client and transmits the response back to the client. In case of thread `F33f`_`[starvation`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Starvation_(computer_science)]`_`f, clients are blocked waiting for threads to become available.
>>Contents
• `F0af`_`[See also`#see-also]`_`f
• `F0af`_`[References`#references]`_`f
-─
>>See also
• `F33f`_`[Asynchronous system`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Asynchronous_system]`_`f
• `F33f`_`[Asynchronous circuit`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Asynchronous_circuit]`_`f
>>References
`:cite-note-davies-1`!1.`! `F0af`_`[↑`#cite-ref-davies-1-0]`_`f `:citerefdavies2012`aDavies, Alex (2012). `*Async in C# 5.0`*. O'Reilly. pp. 1–2. `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 9781449337124.
`:cite-note-spp-2`!2.`! `F0af`_`[↑`#cite-ref-spp-2-0]`_`f `:citerefmccoolreindersrobison2013`aMcCool, Michael; Reinders, James; Robison, Arch (2013). `*Structured Parallel Programming: Patterns for Efficient Computation`*. Elsevier. p. 30.
`:cite-note-3`!3.`! `F0af`_`[↑`#cite-ref-3]`_`f ICE usage of AMD.
`c`F0af`_`[↑ Back to top`#top]`_`f`a